<template>
  <div class="nots">
		<img v-if="resultStatus==1" :src="success" alt="">
		<img v-else :src="danger" alt="">
		<p class="title">{{msg}}</p>
     <!-- 按钮 -->
    <div class="button">
      <div v-if="jxgzl_dz==1" @click="JumpName('staff-center')" class="btn red-btn">点击返回员工中心</div>
      <div v-else @click="JumpName('store-center')" class="btn red-btn">点击返回门店中心</div>
    </div>
	</div>
</template>

<script>
import Vue from 'vue'
export default Vue.extend({
  data() {
    return {
      success:'https://img.wifenxiao.com/h5-wfx/images/hx_success.png',
      danger:'https://img.wifenxiao.com/h5-wfx/images/hx_failer.png',
      order_verify_no: '',
      resultStatus: '',
      msg: '',
      jxgzl_dz: 0 // 1返回员工中心 0返回门店
    }
  },
  created() {
    this.init()
  },
  beforeCreate() {
    // $('body').addClass('bg_white')
    document.getElementsByTagName('body')[0].classList.add('bg_white')
  },
  destroyed() {
    // $('body').removeClass('bg_white')
    document.getElementsByTagName('body')[0].classList.remove('bg_white')
  },
  methods: {
    init() {
      const query = this.$route.query
      this.order_verify_no = query.order_verify_no
      this.msg = query.msg || '核销成功'
      this.resultStatus = this.msg == '核销成功' ? 1 : query.resultStatus
      this.jxgzl_dz = query.jxgzl_dz
    },
    JumpName(url, data) {
      this.$JumpName(this, url, data)
    }
  }
})
</script>

<style lang="scss">
@import 'src/styles/mixin';
.main-container{
  background:#fff;
}
.app-main{
  background:#fff;
}
.nots{
  overflow: hidden;
  img{
    display: block;
    width: 208px;
    height: 184px;
    margin: 150px auto 30px;
  }
  .title{
    font-size: 36px;
    text-align: center;
    margin-bottom: 25px;
  }
  .pay_detail{
    padding: 0 50px;
    color: #666666;
    /*text-align: center;*/
  }
  .button{
    padding: 80px 125px;
    background: #fff;
    .btn{
      line-height:76px;
      height: 76px;
      border:1px solid rgba(242,11,34,1);
      border-radius:38px;
      color: #F20B22;
      font-size: 28px;
      text-align: center;
      margin-bottom: 30px;
      box-sizing: border-box;
      &.red-btn{
        border: 0;
        color: #fff;
        @include gradient(left,rgba(233,1,4,1),rgba(254,27,73,1));
      }
    }
  }
}
</style>
